<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE generatorConfiguration
  PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
  "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
<generatorConfiguration>
    <!--数据库驱动-->
    <context id="DB2Tables"    targetRuntime="MyBatis3">
        <!-- 指定生成的java文件的编码,没有直接生成到项目时中文可能会乱码 -->
        <property name="javaFileEncoding" value="UTF-8"/>
        <!-- 这里的type里写的是你的实现类的类全路径 -->
        
        <commentGenerator type="com.util.GeneratorOverride">
            <!-- 是否去除自动生成的注释 true：是 ： false:否 -->    
            <property name="suppressAllComments" value="true" />
        </commentGenerator>    

        <!--数据库链接地址账号密码-->
        
        <jdbcConnection driverClass="${driverClassName}"
            connectionURL="${url}" userId="${username}"
            password="${password}">
            <!--  针对mysql数据库 -->
       		<property name="useInformationSchema" value="true"></property>
        </jdbcConnection>
        
        
        <javaTypeResolver>
            <property name="forceBigDecimals" value="false"/>
        </javaTypeResolver>


        <!-- 实体类生成的位置 -->
        <javaModelGenerator targetPackage="com.entity.${targetPackage}" targetProject="src/main/java">
            <property name="enableSubPackages" value="false"/>
            <property name="trimStrings" value="true"/>
        </javaModelGenerator>

        <!-- *Mapper.xml 文件的位置 -->
        <sqlMapGenerator targetPackage="resources/mapper/${packageName}" targetProject="src/main">
            <property name="enableSubPackages" value="false"/>
        </sqlMapGenerator>

        <!-- Mapper 接口文件的位置 -->
        <javaClientGenerator targetPackage="com.dao.${targetPackage}" targetProject="src/main/java" type="XMLMAPPER">
            <property name="enableSubPackages" value="false"/>
        </javaClientGenerator>

        <!--生成对应表及类名-->
        <table tableName="${tableName}"
               domainObjectName="${moduleName ? cap_first}"
               enableCountByExample="false"
               enableDeleteByExample="false"
               enableSelectByExample="false"
               enableUpdateByExample="false">
           <!-- <property name="useActualColumnNames" value="true"/>-->
        </table>
    </context>
</generatorConfiguration>